#include<vector>
#include<string>
#include<iostream>
using namespace std;
class Solution {
public:
    vector<bool> camelMatch(vector<string>& queries, string pattern) {
        vector<bool>ans(queries.size(),true);
        int npat=pattern.size();
        for(int i=0;i<queries.size();i++)
        {
            
            int p=0;
            for(auto c:queries[i])
            {
                if(pattern[p]==c)
                {
                    p++;
                }
                else if(isupper(c))
                {
                    ans[i]=false;
                }
            }
            if(p<pattern.size())
                ans[i]=false;
            
        }


        return ans;
    }
};